#include "systemlisten.h"

int systemcmdReport()
{
    char *pjson[10240];
    IOTA_SYSLOG syscmd[5];
    int i = 0;
    while (i < 5)
    {
        // TODO 获取设备登录信息
        syscmd[i].deviceSn = g_mqtt_ob.clientInfo.device_id;
    }
    StructToJson_ReportToSystem(pjson, syscmd, i);
    int ret = IOTA_SendMqtt("/v1/devices/device/events", pjson, strlen(pjson));
    if (ret < 0)
    {
        dzlog_error("send systemcmd error");
    }
    return 0;
}